<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
<head>
<title>新增用户</title>
<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js"
	type="text/javascript"></script>
<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js"
	type="text/javascript"></script>
<link href="${contextPath}/styles/default.css" rel="stylesheet"
	type="text/css" />
<script src="${contextPath}/scripts/scriptvalidator.js" type="text/javascript"></script>
<script>
function selectObject(){
	window.open("${contextPath}/system/treaty/selectCheckShopUser.do?allIds="+$('#shops_id').val(), "newwindow", "height=900, width=1024, toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
}
function show(obj){
	if(obj=="none"){
		$("#shops_id").val("");
		$("#nameField").val("");
	}
	document.getElementById("selectObjectField").style.display=obj;
}
function choose_shop(ids,names){
	$("#shops_id").val(ids);
	$("#nameField").val(names);
}
</script>
</head>
<body leftmargin='8px' topmargin='8px'>
	<div class="navigation">
		<span><a href="javascript:window.history.back();"><img
				src="${contextPath}/images/back_nav_btn.png" /></a> <a
			href="javascript:window.history.back();">返回</a> <a
			href="javascript:window.history.forward();"><img
				src="${contextPath}/images/go_nav_btn.png" /></a> <a
			href="javascript:window.history.forward();">前进</a> <a
			href="javascript:window.location.reload();"><img
				src="${contextPath}/images/refresh_nav_btn.png" /></a> <a
			href="javascript:window.location.reload();">刷新</a> </span>系统管理&gt;&gt;用户管理&gt;&gt;新增
		
	</div>
	<table width="100%" border="0" align="center" cellpadding="0"
		cellspacing="0">
		<tr>
			<td align="center" valign="top" bgcolor="#FFFFFF">
				<div class="xt_main_right_center">
					<form name="form1" action="add.do" method="post" onsubmit="return Validator.Validate(this,3)">
					<input type="hidden" name="redirectUrl" value="<s:property value='redirectUrl'/>" />
					<input type="hidden" id="shops_id" name="shopIds" value=""/>
						<table width="100%" border="0" cellpadding="1" cellspacing="1">
							<tr>
								<td class="right-td-width-bg"><font color="red" size="2">* </font>账号：</td>
								<td><input type="text" name="us.name" id="name"
									class="input" msg="账号不能为空" dataType="Require"/>
									<font color="red"><s:property value="msgMap.get('name')"/></font>	
								</td>
								<td class="right-td-width-bg">邮箱：</td>
								<td><input type="text" name="us.email" id="email"
									class="input" msg="邮箱格式不正确" dataType="Email" /></td>
							</tr>
							<tr>
								<td class="right-td-width-bg"><font color="red" size="2">* </font>密码：</td>
								<td><input type="password" name="us.password" id="password"
									class="input"  msg="密码不能为空" dataType="Require"/></td>
								<td class="right-td-width-bg">性别：</td>
								<td align="left">
									<label style="margin-left: 10px;"><input type="radio" name="us.sex" value="男" checked/>男</label>
									<label><input type="radio" name="us.sex" value="女"/>女</label>
								</td>
							</tr>
							<tr>
								<td class="right-td-width-bg"><font color="red" size="2">* </font>用户名称：</td>
								<td><input type="text" name="us.realName" id="realName"
									class="input"  msg="名称不能为空" dataType="Require"/></td>
								<td class="right-td-width-bg">岗位：</td>
								<td align="left">
									&nbsp;<label><input name="post" type="radio" value="0" checked="checked"  onclick="show('none')"/>管理员</label>
									<label><input type="radio" name="post" value="1" onclick="show('block')"/>驻店顾问</label>
									<label><input type="radio" name="post" value="2" onclick="show('none')"/>区域经理</label>
									<label><input type="radio" name="post" value="3" onclick="show('none')"/>监管科</label>
                                    <label><input type="radio" name="post" value="4" onclick="show('none')"/>其他</label>
								</td>
							</tr>
							<tr>
								<td class="right-td-width-bg">联系电话：</td>
								<td><input type="text" name="us.telephone" id="telephone"
									class="input"  msg="电话格式不正确" dataType="PhoneOrMobile" /></td>
								<td class="right-td-width-bg">状态：</td>
								<td align="left">
									<label style="margin-left: 10px;"><input type="radio" name="us.locked" value="0" checked/>激活</label>
									<label><input type="radio" name="us.locked" value="1"/>禁用</label>
								</td>
							</tr>
							<tr>
								<td class="right-td-width-bg"><font color="red" size="2">* </font>工号：</td>
								<td><input type="text" name="us.jobNumber" id="jobNumber" msg="工号不能为空" dataType="Require" class="input" /></td>
								<td class="right-td-width-bg">生日：</td>
								<td align="left">
								 	<input style="margin-left: 10px;" class="Wdate" type="text" name="us.birthday" winth="200px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="true" value="<s:date name="newDate" format="yyyy-MM-dd"/>"/>
								</td>
							</tr>
							<tr>
								<td class="right-td-width-bg">店铺：</td>
								<td colspan="2" align="left">
									<input type="text" id="nameField" class="input_readOnly_80" readonly="readonly"/>
									<span id="selectObjectField" style="display: none;">
										<a href="javascript:selectObject();"><img src="${contextPath}/images/chakan.gif"/></a>
									</span>
								</td>
								<td width="50%"></td>
							</tr>
							<tr>
								<td colspan="4" align="center"><input type="submit"
									class="btn_submit" value="" /> <input type="reset"
									class="btn_rest" value="" /></td>
							</tr>
						</table>
					</form>
				</div>
			</td>
		</tr>
	</table>

</body>
</html>